<?php
require_once('inc.config.php');

# Just overwrite the data
if(!empty($_GET['directory']))
{
	$_POST['directory'] = directory_name_decrypted($_GET['directory']);
}

if(!empty($_POST['directory']))
{
	$_POST['directory'] = str_replace("\\", '/', $_POST['directory']);
	if(is_dir($_POST['directory']))
	{
		$_SESSION['current_directory'] = $_POST['directory'];
	}
}

header('Location: index.php');
?>